package com.fowo.api.model.development.taskzb;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 开发任务子表 导入导出辅助模型 */
@Getter
@Setter
public class DevelopmentTaskzbExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属开发任务")
  private String parentDevelopmentTaskTaskId;

  @ExcelIgnore
  @ExcelProperty(value = "所属开发任务")
  private Long parentDevelopmentTask;

  @NotBlank(message = "类型不能为空")
  @EnumsString(
    value = { "线上", "线下" },
    message = "类型的可用值为 “线上”, “线下” 其中之一"
  )
  @Size(max = 50, message = "类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*类型")
  private String type;

  @NotNull(message = "计划数量不能为空")
  @ExcelProperty(value = "*计划数量")
  private Integer plannedQuantity;

  @ExcelProperty(value = "完成数量")
  private Integer completedQuantity;
}
